package com.hejia.alauda.jms;

import javax.jms.JMSException;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.MessageListener;

public class AlaudaMessageListener implements MessageListener {

	@Override
	public void onMessage(Message message) {
		if(message instanceof MapMessage) {
			MapMessage msg = (MapMessage) message;
			try {
				System.out.println("event:" + msg.getString("event"));
				System.out.println("text:" + msg.getString("text"));
			} catch (JMSException e) {
				e.printStackTrace();
			}
		}
	}

}
